// tag.ts
import axios from 'axios';

// 删除标签
export const deleteTag = (id: number) => {
  return axios.post('/demandTag/delete', { id });
};

// 新增/修改标签
export const saveTag = (data: {
  id?: number;
  parentId: number;
  type: number;
  name: string;
  info: string;
  status: number;
}) => {
  return axios.post('/demandTag/saveTag', data);
};

// 获取标签列表
export const getTagList = (params) => {
  return axios.get('/demandTag/getList', { params: params });
};

// 获取标签详情
export const getTagDetail = (id: number) => {
  return axios.get('/demandTag/getDetail', { params: { id } });
};
